[vars]
filesize=597347
sha512=858cae086aaca14381961ea13fd77d4b6c16e8fb7b533c83c828c0797ad1f14be25bb55b05b608727c54251e2b92615e674408b95e07e345dbdd11f1d5cf73f3
desc='analyzes files and often outputs helpful information'

[mirrors]
http://distfiles.macports.org/file/file-5.07.tar.gz
ftp://ftp.astron.com/pub/file/file-5.07.tar.gz
http://dbg.download.sourcemage.org/fallback/file-5.07.tar.gz

[build]
printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > tests/Makefile.in
[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
LDFLAGS="$optldflags" \
CC="$CC -Wl,-static -static-libgcc -static -D_GNU_SOURCE -D_BSD_SOURCE" \
CFLAGS="$optcflags" \
./configure -C --prefix="$butch_prefix" \
  --disable-shared $xconfflags
sed -i 's/memory.h/string.h/' src/encoding.c src/ascmagic.c
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
